<template>
  <div id="putland"> 
 <el-form ref="form" :model="form" label-width="80px"> 
     <div  style="display:flex;margin-bottom:10px;align-items: center;">
          <img class="top_img" src="@/assets/images/a8.png" style="width:35px;height:35px;margin-right:10px;"/>
          <div style="line-height: 40px;font-weight:bold:">权限帐号</div>
     </div>  


        <div style="display:flex;">
          <div style="flex:1;display:flex;align-items: center;">

          <div style="width:50px;text-align-last: justify;margin-top:-12px;font-size: 14px;color: #606266;margin-right:0px;">查询项</div>
            <el-form-item label="账户查询">
              <el-input v-model="form.phone" placeholder="姓名/手机号"  style="width:140px;"></el-input>
            </el-form-item>

            <div class="buttoon_box">
                <div class="buttoon_box_item"  style="margin-left:10px;background:#FFC600;color:white;" @click="soure_but1()">确 定</div>
                <div class="buttoon_box_item" style="margin-left:10px;border:1px solid #D9D9D9;"  @click="sx_but()">清 空</div>    
            </div>

         </div>

     </div>

     <div style="display:flex;align-items: center;">
            <div style="width:50px;text-align-last: justify;margin-top:-12px;font-size: 14px;color: #606266;margin-right:0px;">筛选项</div> 

            <el-form-item label="收放类别">
                <el-select  v-model="form.select_num" placeholder="请选择" >
                    <el-option  v-for="(item,index) in select_data" :key="index" :label="item.name" :value="item.id"></el-option>
                </el-select>
            </el-form-item>
 
            <div class="buttoon_box">
                <div class="buttoon_box_item"  style="margin-left:10px;background:#FFC600;color:white;" @click="soure_but1">确 定</div>
                <div class="buttoon_box_item" style="margin-left:10px;border:1px solid #D9D9D9;" @click="sx_but">清 空</div>    
            </div>
     </div>
 
       
  
   </el-form>

   <!-- 渲染数据list -->
   <outland-list :datalist="datalist" > </outland-list>



      
   <div style="margin-top:20px;text-align: center;">
      <el-pagination
        background
        @current-change="handleCurrentChange"
        :page-size="10"  
        layout="prev, pager, next, jumper"
        :total="count">
      </el-pagination>
    </div>



    

      
  </div>
</template>

<script>
import OutlandList from '@/view/Landjurisdiction/OutlandList'
export default {
  name: 'putland',
  data () {
    return {
        form:{
           phone:'',
           select_num:0
        },
        datalist:[],
        page:1,
        count:0,
        select_data:[{"id":0,"name":"全部"},{"id":1,"name":"收"},{"id":2,"name":"放"}],
    }
  },
 components:{
    OutlandList
  },
  created(){
      this.list_fun()
  },
  mounted (){
    
  },
  methods: {
      list_fun(){
          this.post("/member_special/listOfData", {
              page:this.page,
              account:this.form.phone,
              type:this.form.select_num
	        }).then(res => {
            this.count = res.result.count
            this.datalist = res.result.list
            console.log(res)
         })
      },
     soure_but1(){
         this.page = 1
         this.list_fun()
     },
     sx_but(){
          this.form={
           phone:'',
           select_num:0
          }
         this.page = 1
         this.list_fun()
     },
     handleSizeChange(val) {
        console.log(`每页 ${val} 条`);
      },
      handleCurrentChange(val) {
        this.page = val
        this.list_fun()
        console.log(`当前页: ${val}`);
      }
  }
}
</script>


<style scoped>
</style>
